# @Time:   2020/12/8 15:01
# @Author: Zong Wei

import os

import xlrd

from ui_automation_testing.utils.config import DATA_PATH


class ReadExcel:
    @staticmethod
    def read_excel(file_name, sheet_name):
        file_path = os.path.join(DATA_PATH, file_name) + ".xlsx"
        workbook = xlrd.open_workbook(file_path)
        sheet = workbook.sheet_by_name(sheet_name)
        return sheet

